
package upcoming.client;

import java.util.*;

public class Response implements java.io.Serializable
{
	private String status;
	private String version;
	
	private List<Event> events;
	
	private List<WatchlistItem> watchList;
	
	private List<Category> categories;
	
	private List<Venue> venues;

	private List<Metro> metroList;
	
	private List<State> states;
	
	private List<Country> countries;
	
	private List<User> users;

	private UpcomingError error;
	
	private String xml;
	
	public String toString()
	{
		return this.version;
	}

	public String getStatus()
	{
		return status;
	}

	public void setStatus(String stat)
	{
		this.status = stat;
	}

	public String getVersion()
	{
		return version;
	}

	public void setVersion(String version)
	{
		this.version = version;
	}

	public List<Event> getEvents()
	{
		if (events == null)
		{
			events = new ArrayList<Event>();
		}
		
		return events;
	}

	public void setEvents(List<Event> events)
	{
		this.events = events;
	}

	public List<WatchlistItem> getWatchList()
	{
		return watchList;
	}

	public void setWatchList(List<WatchlistItem> watchList)
	{
		this.watchList = watchList;
	}

	public List<Category> getCategories()
	{
		return categories;
	}

	public void setCategories(List<Category> categories)
	{
		this.categories = categories;
	}

	public List<Venue> getVenues()
	{
		return venues;
	}

	public void setVenues(List<Venue> venues)
	{
		this.venues = venues;
	}

	public List<Metro> getMetroList()
	{
		return metroList;
	}

	public void setMetroList(List<Metro> metroList)
	{
		this.metroList = metroList;
	}

	public List<State> getStates()
	{
		return states;
	}

	public void setStates(List<State> states)
	{
		this.states = states;
	}

	public List<Country> getCountries()
	{
		return countries;
	}

	public void setCountries(List<Country> countries)
	{
		this.countries = countries;
	}

	public List<User> getUsers()
	{
		return users;
	}

	public void setUsers(List<User> users)
	{
		this.users = users;
	}

	public String getXml()
	{
		return xml;
	}

	public void setXml(String x)
	{
		this.xml = x;
	}
	
	public boolean isOK()
	{
		return "ok".equalsIgnoreCase(this.status);
	}
	

	public boolean isFail()
	{
		return "fail".equalsIgnoreCase(this.status);
	}

	public UpcomingError getError()
	{
		return error;
	}

	public void setError(UpcomingError e)
	{
		this.error = e;
	}

	
}
